import Snippet from '~/components/snippet'
import Caption from '~/components/text/caption'
import { InlineCode } from '~/components/text/code'
import Note from '~/components/text/note'

export const meta = {
  editUrl: 'pages/docs/now-cli/now-cli-mdx/commands/dev.mdx',
  lastEdited: '2019-10-15T22:03:42.000Z'
}

## Dev

The `now dev` command is used to replicate the ZEIT Now deployment environment locally, allowing you to test your [Serverless Functions](/docs/v2/serverless-functions/introduction), without requiring you to deploy each time a change is made.

<Note>
  Before using the <InlineCode>now dev</InlineCode> command, make sure to
  install your project's dependencies.
</Note>

### Basic Usage

<Snippet dark text="now dev" />
<Caption>Using the <InlineCode>now dev</InlineCode> command from the root of a project directory.</Caption>

### Global Options

The following [global options](#options) can be passed when using the `now dev` command:

- `--debug`
- `--help`

For more information on global options and their usage, refer to the [options section](#options).

### Unique Options

These are options that only apply to the `now dev` command, therefore, more information is provided.

#### Listen

The `--listen` option, shorthand `-l`, can be used to specify which port `now dev` runs on.

##### Usage Example

<Snippet dark text="now dev --listen 5005" />
<Caption>Using the <InlineCode>now dev</InlineCode> command with the <InlineCode>--listen</InlineCode> option.</Caption>
